<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="button1">按钮</button>
    <input type="submit" value="111">
    <script>
        var btn1=document.querySelector('#button1');
        btn1.onclick=function(){
            console.log('做一些事');
            this.disabled=true;
        }

        var btn2=document.querySelector('input');
        btn2.onclick=function(){
            console.log(111);
            this.value='222';
        }
    </script>
</body>
</html>